<% if logged_in? %>
  <% if current_user.is_publisher? || current_user.is_admin? %>
    <div class="section">
      <h3>page menu</h3>
      <ul class="user_actions">
        <li><%= link_to "create page", new_page_path %></li>
        <% if (current_user.is_editor?  && current_user.owns?(@page)) || current_user.is_admin? %>
      	  <% unless @page.state == "pending"  %>
  			  <li><%= link_to "edit \"#{@page.name}\"", edit_page_path(@page) %></li>
      		<% end %>
      	<% end %>
  		</ul>
    </div>
  <% end %>
<% end %>